[py] Fix docstring formatting and apply ruff linting rules #16527
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
🔗 Related Issues
#16432
#11442
💥 What does this PR do?
This PR adds ruff rules for docstring linting in Python. It also fixes many violations to make docstrings more consistent and adhere to google-style.
💡 Additional Considerations
As we continue to fix docstrings, we will remove ignored rules from
extend-ignoreuntil ruff can run clean with no violations.🔄 Types of changes
PR Type
Enhancement, Tests
Description
Add ruff docstring linting rules (D) to enforce Google-style formatting
Fix docstring formatting across 40+ Python files for consistency
Move closing triple quotes to separate lines for multi-line docstrings
Remove blank lines after docstring opening and before closing quotes
Configure ruff with Google convention and ignore rules for gradual cleanup
File Walkthrough
1 files
Add ruff docstring linting rules configuration39 files
Fix module-level docstring formattingFix exception class docstring formattingFix docstring escape sequence formattingFix ChromiumDriver docstring formattingFix action chains method docstringsRemove empty docstring from add_action methodFix network handler docstring formattingFix script execution docstring formattingFix async logging method docstringsFix options class docstring formattingFix Proxy class docstring formattingFix selenium manager method docstringsFix service class method docstringsFix Timeouts constructor docstring formattingFix authenticator decorator docstringsFix firefox binary method docstringFix firefox profile docstring formattingFix firefox options property docstringsFix Firefox driver docstring formattingFix IE driver docstring formattingFix FileDetector class docstringFix remote connection method docstringFix remote webdriver docstring formattingRemove outdated Cygwin path exampleFix Safari options descriptor docstringFix Color class docstring formattingFix EventFiringWebDriver docstringFix relative locator method docstringFix Select class docstring formattingFix WebKitGTK options docstring formattingFix WebKitGTK driver docstring formattingFix WPEWebKit options docstring formattingFix WPEWebKit driver docstring formattingRemove blank lines after test docstringsFix test example docstring formattingFix test docstring formattingFix test docstring formattingFix module docstring formattingFix module docstring formatting